import Vue from 'vue'
import Router from 'vue-router'

 //Vue中使用router插件
 Vue.use(Router)

 //路由配置，配置路由路径与组件的对应关系
const routes = [  
  {
    path: '/',
    redirect: '/main'
  },      
  {
    path: '/main',
    name: 'Main',
    component: () => import('../components/main.vue')
  },
  {
    path: '/thirdView',
    name: 'thirdView',
    component: () => import('../components/thirdView.vue')
  }
]
 
 //新建路由实例
const router = new Router({ 
  routes
})
 
 //导出路由实例，在main.js中导入使用
export default router  
